package com.temi.demo.bean;

/**
 * Created by coco on 2018/3/14.
 * <p>
 * 后台返回的公共内容
 */
public class BaseResult<T> {
    /**
     * 状态码 0-成功，-1-失败，2-未登录，3-无操作权限
     * 如果retCode=1，那么弹框报错retMsg信息
     * 如果retCode=2,那么转跳到登录页面
     * 如果retCode=3,那么弹框报错retMsg信息
     */
    public int retCode;
    public String retMsg;
    public boolean success;

    private int total;
    private T result;

    public int getRetCode() {
        return retCode;
    }

    public void setRetCode(int retCode) {
        this.retCode = retCode;
    }

    public String getRetMsg() {
        return retMsg;
    }

    public void setRetMsg(String retMsg) {
        this.retMsg = retMsg;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "BaseResult{" +
                "retCode=" + retCode +
                ", retMsg='" + retMsg + '\'' +
                ", success=" + success +
                ", total=" + total +
                ", result=" + result +
                '}';
    }
}
